module testbench; 

event e1,e2;

task t1();
    $display("t1 wait");
    @ e1;
    $display("t1 done");
endtask 

task t11();
    $display("t11 wait");
    @ e1;
    $display("t11 done");
endtask 

task t2();
    $display("t2 start");
    #5;
    $display("t2 trig");
    ->e1;
    $display("t2 done");
endtask 


initial begin
    $display("\033[32m\t\t!!\tcode begin\t!!");
    fork 
        t1();
        t2();
        t11();
    join  
    $display("\t\t!!\tcode end\t!!\033[0m");
    $finish; 
end 
endmodule 